using System;
using System.Collections.Generic;
using Module.Core.DAO;
using Module.Core.EntitiesInfo;
using Module.Common.Models;

namespace Module.Core.BusinessLogic
{
    public class SingerBL
	{
		/// <summary>
		/// Saves a record to the Singer table.
		/// </summary>
		public static int Insert(SingerInfo singerInfo)
		{
			try
			{
				return new SingerDAO().Insert(singerInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Saves a record to the Singer table.
		/// </summary>
        public static void Update(SingerInfo singerInfo)
		{
			try
			{
				new SingerDAO().Update(singerInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Delete a record from the Singer table.
		/// </summary>
        public static void Delete(int singerId)
		{
			try
			{
				new SingerDAO().Delete(singerId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects a single record from the Singer table.
		/// </summary>
        public static SingerInfo Select(int singerId)
		{
			try
			{
				return new SingerDAO().Select(singerId);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

		/// <summary>
		/// Selects all records from the Singer table.
		/// </summary>
        public static CHRTList<SingerInfo> SelectAll(int status)
		{
			try
			{
				return new SingerDAO().SelectAll(status);
			}
			catch (Exception ex)
			{
				throw;
			}

		}
        public static CHRTList<SingerInfo> SearchAll(string keyword, int status, int from, int to)
		{
			try
			{
                return new SingerDAO().SearchAll(keyword, status, from, to);
			}
			catch (Exception ex)
			{
				throw;
			}

		}  
      public static int GetCount(string keyword,int status)
      {
          try
          {
              return new SingerDAO().GetCount(keyword, status);
          }
          catch (Exception)
          {
              
              throw;
          }
      }
	
	}
}
